
function serialize(object) {
	var s = "<" + object.type + ">\r\n";
	for (var name in object) {
		var type = typeof object[name];
		if (isSimpleVar(type)) {
			s += "<" + name.toLowerCase() + ">" + object[name] + "</" + name.toLowerCase() + ">\r\n";
		}
	}
	s += "</" + object.type + ">\r\n";
	return s;
}
function isSimpleVar(type) {
	switch (type) {
	  case "int":
	  case "string":
	  case "String":
	  case "Number":
	  case "number":
	  case "Boolean":
	  case "boolean":
	  case "bool":
	  case "dateTime":
	  case "Date":
	  case "date":
	  case "float":
		return true;
	}
	return false;
}

